![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@nuintun/qrcode
Advanced tools
A pure JavaScript QRCode encode and decode library.
Modify from kazuhikoarase/qrcode-generator and cozmo/jsQR
import { Encoder, QRByte, QRKanji, ErrorCorrectionLevel } from '@nuintun/qrcode';
const qrcode = new Encoder();
qrcode.setEncodingHint(true);
qrcode.setErrorCorrectionLevel(ErrorCorrectionLevel.H);
qrcode.write('你好世界\n');
qrcode.write(new QRByte('hello world\n'));
qrcode.write(new QRKanji('こんにちは世界'));
qrcode.make();
console.log(qrcode.toDataURL());
new Encoder(options?: Options): Encoder
getMatrix(): boolean[][]
getMatrixSize(): number
setVersion(version: number): Encoder
0
the version will be set automatically.getVersion(): number
setErrorCorrectionLevel(errorCorrectionLevel: ErrorCorrectionLevel): Encoder
getErrorCorrectionLevel(): ErrorCorrectionLevel
setEncodingHint(encodingHint: boolean): Encoder
getEncodingHint(): boolean
write(data: string | QRByte | QRKanji | QRNumeric | QRAlphanumeric): Encoder
QRByte
by default.isDark(row: number, col: number): boolean
make(): Encoder
toDataURL(moduleSize?: number, margin?: number, colors?: Colors): string
clear(): void
import { Encoder, QRByte } from '@nuintun/qrcode';
const qrcode = new Encoder();
qrcode.setEncodingHint(true);
// Custom your own encode function return bytes and encoding
// The encoding value must a valid ECI value
// Custom ECI only support QRByte mode
// https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/common/CharacterSetECI.java
qrcode.write(
new QRByte('hello world', data => ({
encoding: 26,
bytes: [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]
}))
);
qrcode.make();
console.log(qrcode.toDataURL());
import { Decoder } from '@nuintun/qrcode';
const qrcode = new Decoder();
qrcode
.scan('https://nuintun.github.io/qrcode/examples/qrcode.jpg')
.then(result => {
console.log(result.data);
})
.catch(error => {
console.error(error);
});
new Decoder(options?: Options): Decoder
setOptions(options: Options): Decoder
scan(src: string): Promise<DecoderResult>
Notice: support browser environment only.
decode(data: Uint8ClampedArray, width: number, height: number): DecoderResult
FAQs
A pure JavaScript QRCode encode and decode library.
The npm package @nuintun/qrcode receives a total of 20,359 weekly downloads. As such, @nuintun/qrcode popularity was classified as popular.
We found that @nuintun/qrcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.